package myJs.user.workflow.featureSelection.preprocess

import cats.effect.SyncIO
import japgolly.scalajs.react.vdom.all._
import myJs.myPkg.reactHookForm.UseFormRT
import shared.Pojo.{EachPreprocessData, FsPreprocessData, SubSoftT}
import shared.pojo.WorkflowMission.ExtraData

/** Created by yz on 23/9/2022
  */
object AllCp {

  val cps: List[PreprocessT with SubSoftT] = List(
    NaIdentifyCp,
    ColRemoveCp,
    RowRemoveCp,
    QcFilterCp,
    VarMergeCp,
    NaFillCp,
    NormalCp,
    LoessCp,
    TransformCp,
    InnerNormalCp,
    ExtraNormalCp,
    LevelRemoveCp,
    StandardCp,
    RemoveQcCp
  )

  val kindCpMap = cps.map { c =>
    (c.nameStr, c)
  }.toMap

  trait PreprocessT {

    def cp(
        curI: Int,
        datas: List[EachPreprocessData],
        datasChange: List[EachPreprocessData] => SyncIO[Unit],
        insertModule: String => SyncIO[Unit],
        removeModule: Int => SyncIO[Unit],
        extraData: ExtraData
    ):VdomElement

  }

}
